#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np


df=pd.DataFrame(
    np.arange(12).reshape(3,4),
    columns=['AA','AB','C','D'])

# 查找包含 'Loc' 的列名
partial_match = df.columns[df.columns.str.contains('A')]
print("partial_match:", partial_match)

# 使用部分匹配的列名进行查询
result = df[partial_match]
print("result:", result)

print(df['C'])
print(df[['C','D']])
